import request from '@/utils/request'

// export function getDepts(params) {
//   return request({
//     url: 'dept',
//     method: 'get',
//     params
//   })
// }
//新增
export function goodsPlatformCreate(data) {
  return request({
    url: 'goods/platform/create',
    method: 'post',
    data
  })
}

//删除
export function goodsPlatformDelete(data) {
  console.log(JSON.stringify(data));
  return request({
    url: 'goods/platform/delete',
    method: 'post',
    data
  })
}

//修改
export function goodsPlatformUpdate(data) {
  return request({
    url: 'goods/platform/update',
    method: 'post',
    data
  })
}

//是否启用
export function goodsPlatformUpdateStatus(data) {
  return request({
    url: 'goods/platform/updateStatus',
    method: 'post',
    data
  })
}

export function del(ids) {
  return request({
    url: 'dept',
    method: 'delete',
    data: ids
  })
}

export function edit(data) {
  return request({
    url: 'dept',
    method: 'put',
    data
  })
}

//新增取模演示与精彩活动
export function tbDemoMoldTakingCreate(data) {
  return request({
    url: 'tbDemoMoldTaking/create',
    method: 'post',
    data
  })
}

//删除取模演示与精彩活动
export function tbDemoMoldTakingDelete(data) {
  return request({
    url: 'tbDemoMoldTaking/delete',
    method: 'post',
    data
  })
}

//修改取模演示与精彩活动
export function tbDemoMoldTakingUpdate(data) {
  return request({
    url: 'tbDemoMoldTaking/update',
    method: 'post',
    data
  })
}

//是否发布
export function tbDemoMoldTakingUpdateStatus(data) {
  return request({
    url: 'tbDemoMoldTaking/updateStatus',
    method: 'post',
    data
  })
}

// 支付宝支付 
export function alipayGetPayInfo(data) {
  return request({
      url: 'alipay/getPayInfo',
      method: 'post',
      data
  })
} 

// 订单详情
export function getTbMallOrdersById(data) {
  return request({
      url: 'tbMallOrdersController/getTbMallOrdersById',
      method: 'post',
      data
  })
}

// 物流查询 
export function selectExpress(data) {
  return request({
      url: 'tbMallOrdersController/selectExpress',
      method: 'post',
      data
  })
} 

// 填写查询 
export function saveOrderExpress(data) {
  return request({
      url: 'tbMallOrdersController/saveOrderExpress',
      method: 'post',
      data
  })
} 

export default { 
  goodsPlatformCreate,
  goodsPlatformDelete,
  goodsPlatformUpdate,
  goodsPlatformUpdateStatus,
  tbDemoMoldTakingCreate,
  tbDemoMoldTakingDelete,
  tbDemoMoldTakingUpdateStatus,
  tbDemoMoldTakingUpdate,
  alipayGetPayInfo,
  getTbMallOrdersById,
  selectExpress,
  saveOrderExpress
}
